package com.res.share.model.dto;

import com.res.share.common.utils.StringUtils;

import java.io.Serializable;
import java.util.Date;

public class MessageModel implements Serializable {

    private Integer messageId;

    private String title;

    private String content;

    private String status;

    private Integer msgType;

    private Date createTime;

    private String receiveName;

    private String receiveId;

    private String sendName;

    private Integer sendId;

    public String getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(String receiveId) {
        this.receiveId = receiveId;
    }

    public Integer getSendId() {
        return sendId;
    }

    public void setSendId(Integer sendId) {
        this.sendId = sendId;
    }

    public String getReceiveName() {
        return receiveName;
    }

    public void setReceiveName(String receiveName) {
        this.receiveName = receiveName;
    }

    public String getSendName() {
        return sendName;
    }

    public void setSendName(String sendName) {
        this.sendName = sendName;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public Integer getMessageId() {
        return messageId;
    }

    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        if(StringUtils.isNotEmpty(status)){
            if(status.equalsIgnoreCase("1")){
                this.status = "已读";
            }else {
                this.status = "未读";
            }
        }else {
            this.status = status;
        }
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
